package br.com.werp.suporte.Empresa;
import java.util.*;
import org.apache.struts.action.*;
import javax.servlet.http.*;

/**
 * Creation Date 22/12/2006 12:37:22
 * Last Modify Date 27/12/2006 08:42:34
 */

public class CadastrarSetorEmpresaActionForm extends org.apache.struts.action.ActionForm {
  public String stem_id;
  public String stem_empresa;
  public String stem_setor;
  public String empr_descricao;
  public String stor_descricao;
  private boolean valida = false;
  public CadastrarSetorEmpresaActionForm() {
  }
  /**
    * STEM_ID: Gets the value of this field.
    */
  public String getStem_id() {
    return stem_id;
  }
  /**
     * STEM_ID: Sets thhe value for this field.
     */
  public void setStem_id(String STEM_ID) {
    stem_id = STEM_ID;
  }
  /**
    * STEM_EMPRESA: Gets the value of this field.
    */
  public String getStem_empresa() {
    return stem_empresa;
  }
  /**
     * STEM_EMPRESA: Sets thhe value for this field.
     */
  public void setStem_empresa(String STEM_EMPRESA) {
    stem_empresa = STEM_EMPRESA;
  }
  /**
    * STEM_SETOR: Gets the value of this field.
    */
  public String getStem_setor() {
    return stem_setor;
  }
  /**
     * STEM_SETOR: Sets thhe value for this field.
     */
  public void setStem_setor(String STEM_SETOR) {
    stem_setor = STEM_SETOR;
  }
  /**
    * EMPR_DESCRICAO: Gets the value of this field.
    */
  public String getEmpr_descricao() {
    return empr_descricao;
  }
  /**
     * EMPR_DESCRICAO: Sets thhe value for this field.
     */
  public void setEmpr_descricao(String EMPR_DESCRICAO) {
    empr_descricao = EMPR_DESCRICAO;
  }
  /**
    * STOR_DESCRICAO: Gets the value of this field.
    */
  public String getStor_descricao() {
    return stor_descricao;
  }
  /**
     * STOR_DESCRICAO: Sets thhe value for this field.
     */
  public void setStor_descricao(String STOR_DESCRICAO) {
    stor_descricao = STOR_DESCRICAO;
  }
  /**
    * Reset all fields.
    */
  public void reset(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    stem_id = null;
    stem_empresa = null;
    stem_setor = null;
    empr_descricao = null;
    stor_descricao = null;
  }
  /**
    * Validate fields and return ActionErrors.
    */

  public ActionErrors validate(org.apache.struts.action.ActionMapping mapping,
      javax.servlet.http.HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    valida = false;
    if (com.egen.util.text.Validate.isValidate("salvar_action,excluir_action,",
        request)) {



      if (com.egen.util.text.Validate.isNull(empr_descricao)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","Empresa","empr_descricao",
                "0"));
      }
      if (com.egen.util.text.Validate.isNull(stor_descricao)) {
        errors.add("ActionErrors.GLOBAL_ERROR",
            new ActionError("error.validate.notnull","Setor","stor_descricao",
                "0"));
      }
    }
    if (errors != null && errors.size() > 0) {
      javax.servlet.http.HttpSession session = request.getSession(true);
      ActionForward actionForward = null;
      session.setAttribute(mapping.getName(), this);
    }
    return errors;
  }
}
